// pages/consult/zixun/aftersaixuan/aftersaixuan.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[],
  },
  findxinxi(option){
    let i = option.currentTarget.dataset.index;
    let y = this.data.list[i].teacherId;
    wx.navigateTo({
      url: '/pages/course/kecheng/teacher/teacher?id=' + y,
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    var that = this;
<<<<<<< HEAD
    const { teacherAddress, fieldName, teacherGradeName, teacherSex, consultName } = options;
    const url = `http://localhost:8080/zixun/selectList2?teacherAddress=${encodeURIComponent(teacherAddress)}&fieldName=${encodeURIComponent(fieldName)}&teacherGradeName=${encodeURIComponent(teacherGradeName)}&teacherSex=${encodeURIComponent(teacherSex)}&consultName=${encodeURIComponent(consultName)}`;
    wx.request({
      url: url,
      success(res) {
        that.setData({
          list: res.data.data
=======
    const { teacherAddress, fieldName, teacherGradeName, teacherSex, moneyType } = options;
    const url = `http://localhost:8080/zixun/selectList2?teacherAddress=${teacherAddress}&fieldName=${fieldName}&teacherGradeName=${teacherGradeName}&teacherSex=${teacherSex}&moneyType=${moneyType}`
    wx.request({
      url: url,
      success(res) {
        console.log(res.data);
        that.setData({
          list: res.data.data,
>>>>>>> fenzhi
        });
      },
      fail(err) {
        console.error("请求失败", err);
      }
    });
<<<<<<< HEAD
    console.log(that.list);
},
=======
},

>>>>>>> fenzhi


  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})